//
//  ZYTextField.m
//  CommunityApp
//
//  Created by 秦乾龙 on 17/1/9.
//  Copyright © 2017年 秦乾龙. All rights reserved.
//

#import "ZYTextField.h"

@implementation ZYTextField


// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    self.tintColor = [UIColor whiteColor];  //设置光标颜色
    
    //修改占位符文字颜色
    NSMutableDictionary *attrs = [NSMutableDictionary dictionary];
    attrs[NSForegroundColorAttributeName] = ZallColorFromRGB(0x393b3b);
    self.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.placeholder attributes:attrs];
}


//- (instancetype)init
//{
////    [super init];
//    self.tintColor = ZallColorFromRGB(0x393b3b);  //设置光标颜色
//    
//    //修改占位符文字颜色
//    NSMutableDictionary *attrs = [NSMutableDictionary dictionary];
//    attrs[NSForegroundColorAttributeName] = [UIColor whiteColor];
//    self.attributedPlaceholder = [[NSAttributedString alloc] initWithString:self.placeholder attributes:attrs];
//    return self;
//}

@end
